package com.link.base.core.apiutils;

import com.link.core.util.BeanTools;
import org.springframework.core.env.Environment;

/**
 * Created by 赵世光 on 2019/2/19.
 * 读取配置文件配置属性
 */
public class SpringPropertyUtil {


    /**
     * 获取配置文件里的配置，调用如：SpringPropertyUtil.getProperty("linkcrm.attachment.path");
     * @param property
     * @return
     */
    public static String getProperty(String property) {
        Environment env = (Environment)BeanTools.getBean(Environment.class);
        String result = env.getProperty(property);
        return result;
    }



}
